package com.example.mygame.mystick;

import java.util.Random;

import android.content.Context;
import android.graphics.RectF;

import com.example.mygame.utils.Utils;


public class MyRect extends RectF {
	
	Random random;
//	random_index = new int[2];
//	random_index[0] = random.nextInt(16);

	public MyRect(Context context) {
		this.top = Utils.getInstance(context).screenHeight()-Utils.getInstance(context).dp2px(200);
		this.bottom = Utils.getInstance(context).screenHeight()-2;
	}
	
	public MyRect(Context context, int left, int right) {
		this(context);
		this.left = left;
		this.right = right;
	}
	
	public MyRect(Context context, int left) {
		this(context);
		Random random = new Random();
		int rect_min_width = Utils.getInstance(context).dp2px(5);
		int random_width = Utils.getInstance(context).dp2px(100);
		this.left = left;
		this.right = this.left + (rect_min_width + random.nextInt(random_width));

	}
	
	public void setOffset(int offset) {
		this.left += offset;
		this.right += offset;
	}
	public void setLeft(int left) {
		this.left = left;
	}
	
	public void setRight(int right) {
		this.right = right;
	}
}
